﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace msBsc.WebUi.mMall.Seller
{
	public partial class mfChatMessageList : msBsc.Cls.mBPDealer
	{
		protected void Page_Load(object sender, EventArgs e)
		{

		}

        private void getMessage()
        {
            string userId = msBsc.SvRef.UserInfo.Operator;
            using (msBsc.AppLogic.DataAlc.CBizChatMessage chatMessage = new AppLogic.DataAlc.CBizChatMessage())
            {
                DataTable dt = chatMessage.GetGroups(userId);
                if (dt == null || dt.Rows.Count < 1)
                {
                    return;
                }
                //chatMessage.UpdateStatus(ds);
                string ret = msBsc.AppLogic.Cfg.HttpTools.GetJsonByTable(dt, "", "", 1, 1000, "");
                this.ExecJScript(@"showMessageList(" + ret + ")");
            }
        }

        public override void DoAction()
        {
            if (this.strAction == "init")
            {
                getMessage();
            }
        }
	}
}